/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.uc.domain.req;

import com.xy.lang.validation.UpdateChecks;
import com.xy.lang.validation.annotation.AlertMessage;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 *
 *
 * @author zsp
 * @date 2020-8-19
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class SaveUserRequest {

	/**
	 * 用户Id
	 */
	@NotNull(message = "userCode-required", groups = { UpdateChecks.class })
	private Long userId;
	/**
	 * 用户编码，登录名
	 */
	@AlertMessage(code = "userCode-required", msg = "登录名不能为空")
	@NotBlank(message = "登录名不可为空")
	private String userCode;
	/**
	 * 显示名称
	 */
	@AlertMessage(code = "userName-required", msg = "登录名不能为空")
	@NotBlank(message = "用户名不可为空")
	private String userName;
	/**
	 * 头像
	 */
	@Length(max=255)
	private String avatar;
	/**
	 * 手机号
	 */
//	@AlertMessage(code = "mobile-required", msg = "手机号不可为空")
//	@NotBlank(message = "手机号不可为空")
	private String mobile;
	/**
	 * 邮箱
	 */
//	@AlertMessage(code = "email-required", msg = "邮箱不可为空")
//	@NotBlank(message = "邮箱不可为空")
//	@Email
	private String email;
	/**
	 * 用户类型：0-客户，1-商家，2-平台，3-运维
	 */
	@NotNull
	private Integer type;

	/**
	 * 部门id
	 */
	private Long userGroupId;

	/**
	 * 初始密码
	 */
	private String initialPassword;

	/**
	 *
	 */
	private List<Long> roleIdList;

}
